<?php
  	//phpinfo(); //This writes directly to the response
	if(isset($_REQUEST['submit']))
	{
		print_r($_FILES);
		move_uploaded_file(
			$_FILES['file1']['tmp_name'], //Move from
			'../Uploaded/' . $_REQUEST['name'] //Move to here
		);
		mail('N00001387@newpaltz.edu', 'File Uploaded', "The User has uploaded a file we called $_REQUEST[name] ");
		
	}
?>
<form enctype="multipart/form-data" method="post"> 
	<label for="name">New Name of File</label>
	<input type="text" name="name" id="name"/>
	<br/>
	<label for="file1">File to Upload</label>
	<input type="file" name="file1" id="file1"/>
	<br/>
	
	<input type="submit" name="submit" value="Upload" />
</form>